package com.pocketmenu.business;

import android.telephony.SmsManager;
import android.util.Log;

public class SMS {
	
	//---sends an SMS message to another device---
    public static boolean sendSMS(String phoneNumber, String message)
    {    
    	boolean success = false;
    	
    	try
    	{
	    	if(phoneNumber.length() > 0 && message.length() > 0)
	    	{	                        
		        SmsManager sms = SmsManager.getDefault();
		        sms.sendTextMessage(phoneNumber, null, message, null, null);
		        success = true;
	    	}
    	}
    	catch (Exception e)
    	{
    		Log.w(SMS.class.getName(), e.getMessage());
    		success = false;    				
    	}
    	return success;
    }   
}
